package jianzhiOffer;

public class num05 {
    public String replaceSpace(String s) {
        int len = s.length();
        StringBuilder sb = new StringBuilder();
        for(int i = 0;i < len;i ++) {
            if(s.charAt(i) == ' ') {
                sb.append("%20");
            }else {
                sb.append(s.charAt(i));
            }
        }
        return sb.toString();
    }
}
